package com.mzj.saas.mservice.auth.controller;

import com.mzj.saas.commons.ResultBean;
import com.mzj.saas.mservice.auth.service.InitNumberVerifyService;
import com.mzj.saas.mservice.auth.vo.InitNumberVerifyVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 手机号码认证服务
 * @author shun
 * @createDate: 2022年6月9日 下午8:39:02
 * @version: 1.0
 *
 */
@Controller
@RequestMapping("/auth")
public class PhoneNumberCertificationController {
    @Autowired
    private InitNumberVerifyService initNumberVerifyService;


    /**
     * 开始认证前通过本接口获取AppEncryptInfo
     * @return
     * @author xin
     * @date 2022年6月27日
     */
    @GetMapping("/appEncryptInfo")
    @ResponseBody
    public ResultBean<Object> getAppEncryptInfo(  @RequestParam(name = "schemeCode", required = false)   String schemeCode) throws Exception {
        return initNumberVerifyService.getAppEncryptInfo(schemeCode);
    }



    /*
     *一键登录取号
     */
    @PostMapping(value = "getMobile")
    @ResponseBody
    public ResultBean<Object> getMobile( @RequestBody InitNumberVerifyVo vo) {
        return initNumberVerifyService.getMobile(vo);
    }


}
